<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        li{
            list-style: none;
        }
        #content{
            width: 300px;
            height: 300px;
            margin: 0 auto;
        }
        #content ul{
            /* border: 1px solid #000; */
            display: none;
        }
        #title{
            display: flex;
            justify-content: space-around;
            width: 300px;
            width: 300px;
            margin: 0 auto;
            /* border: 1px solid #000; */
        }
    </style>
</head>

<body>
        <ul id="title">
            <li>
                第一课
            </li>
            <li>第二课</li>
            <li>第三课</li>
        </ul>


    <div id="content">
     <ul style="display: block;">
         <li>123</li>
     </ul>
     <ul>
         <li>456</li>
     </ul>
     <ul>
         <li>789</li>
     </ul>
    </div>
</body>

</html>
<script>
    var title = document.getElementById('title').getElementsByTagName('li')
    var content = document.getElementById('content').getElementsByTagName('ul')
    for(var i = 0 ; i < title.length ; i++){
        title[i].index = i
      title[i].onmouseover = function () {
         for(var s = 0 ; s < content.length ; s++){
            content[s].style.display = 'none'
         }
         content[this.index].style.display = 'block'
      }
    }
</script>